package com.xique.door.controller;

import com.xique.common.core.domain.R;
import com.xique.common.core.web.controller.BaseController;
import com.xique.door.biz.service.ILogBizService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shd
 * @create 2022/4/18 11:38
 */
@RestController
@RequestMapping("/log")
public class LogInfoController extends BaseController {

    @Autowired
    private ILogBizService logBizService;

    @PostMapping("/saveLoginInfo")
    @ApiOperation("存储登录日志")
    public R<Boolean> saveLoginInfo(@RequestParam("username") String username,
                                    @RequestParam("status") String status,
                                    @RequestParam("message") String message,
                                    @RequestParam("platform") String platform) {
        return logBizService.saveLoginInfo(username, status, message, platform);
    }
}
